// import { getCookie } from '@/utils/cookie-tool';

export const state = () => ({
  counter: 0,
  tempToken: null // 临时token用于替换失效token添加到请求头中
})

export const getters = {
  getCounter(state) {
    return state.counter
  },
  tempTokenGetters (state) {
    return state.tempToken
  }
}

export const mutations = {
  increment(state) {
    state.counter++
  },
  changeTempToken (state, payload) {
    state.tempToken = payload
  }
}

export const actions = {
  nuxtServerInit({ commit }, { req, app }) {
    // // 一些状态初始化或者token设置
    // console.log('nuxtServerInit')
  },
};

